# coding: utf8

import ConfigParser
import os

path = os.path.split(os.path.realpath(__file__))[0] + '/url.conf'

#获取config配置文件
def get_config(section, key):
	config = ConfigParser.ConfigParser()
	config.read(path)
	return config.get(section, key)

def set_config(section, key, value=''):
	config = ConfigParser.ConfigParser()
	config.read(path)
	config.set(section, key, value)
	with open(path, 'w') as fw:
		config.write(fw)